package pojo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Player implements Serializable {
    private int id; //账户id
    private String name; //账户名称
    private String pwd; //密码
    private int money=0; //金币
    private List<Integer> totalChess=new ArrayList<Integer>(Arrays.asList(1,2));//拥有的棋子皮肤 默认有两个棋子(1黑子 2白子)
    private int withAIWin=0; //人机对战赢的次数
    private int withPlayerWin=0; //人人对战赢的次数
    private int withAILose=0; //人机对战输的次数
    private int withPlayerLose=0; //人人对战输的次数
    private transient int chess=0; //现在在用的棋子
    private transient int regret=0; //现在悔棋次数

    public Player(){}
    public Player(String name, String pwd) {
        this.name = name;
        this.pwd = pwd;
    }

    public Player(int id, String name, String pwd, int money, List<Integer> totalChess, int withAIWin, int withPlayerWin, int withAILose, int withPlayerLose) {
        this.id = id;
        this.name = name;
        this.pwd = pwd;
        this.money = money;
        this.totalChess = totalChess;
        this.withAIWin = withAIWin;
        this.withPlayerWin = withPlayerWin;
        this.withAILose = withAILose;
        this.withPlayerLose = withPlayerLose;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    public List<Integer> getTotalChess() {
        return totalChess;
    }

    public void setTotalChess(List<Integer> totalChess) {
        this.totalChess = totalChess;
    }

    public int getChess() {
        return chess;
    }

    public void setChess(int chess) {
        this.chess = chess;
    }

    public int getRegret() {
        return regret;
    }

    public void setRegret(int regret) {
        this.regret = regret;
    }

    public int getWithAIWin() {
        return withAIWin;
    }

    public void setWithAIWin(int withAIWin) {
        this.withAIWin = withAIWin;
    }

    public int getWithPlayerWin() {
        return withPlayerWin;
    }

    public void setWithPlayerWin(int withPlayerWin) {
        this.withPlayerWin = withPlayerWin;
    }

    public int getWithAILose() {
        return withAILose;
    }

    public void setWithAILose(int withAILose) {
        this.withAILose = withAILose;
    }

    public int getWithPlayerLose() {
        return withPlayerLose;
    }

    public void setWithPlayerLose(int withPlayerLose) {
        this.withPlayerLose = withPlayerLose;
    }

    @Override
    public String toString() {
        return "Player{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", pwd='" + pwd + '\'' +
                ", money=" + money +
                ", totalChess=" + totalChess +
                ", withAIWin=" + withAIWin +
                ", withPlayerWin=" + withPlayerWin +
                ", withAILose=" + withAILose +
                ", withPlayerLose=" + withPlayerLose +
                ", chess=" + chess +
                ", regret=" + regret +
                '}';
    }
}
